<!--
 * @Author: monet hanxu@huaun.com
 * @Date: 2023-09-13 09:52:40
 * @LastEditors: monet hanxu@huaun.com
 * @LastEditTime: 2023-09-13 19:34:42
 * @FilePath: /h-radar-expose/components/OperateBtn.vue
 * @Description:
-->
<template>
  <div class="OperateBtn-wrap">
    <el-tooltip
      v-for="(item, index) in operateList"
      :key="index"
      class="item"
      effect="dark"
      :content="item.label"
      placement="bottom"
    >
      <i :class="`${item.icon}`" @click="operateClick(item.name)"></i>
    </el-tooltip>
  </div>
</template>

<script lang="ts" setup> 
  import {defineProps,defineEmits, reactive} from 'vue';
  const emit=defineEmits(['operateClick'])
  const props =defineProps({
    item: {
      type: Object,
      default: () => {
        return {}
      },
    },
  })
  const operateList=reactive([
       {
          name: 'url',
          label: '访问',
          icon: 'vul-icon-url',
        },
  ])
  const operateClick=(type)=> {
      emit('operateClick', type, props.item)
    }
</script>
<style lang="scss" scoped>
.OperateBtn-wrap {
  // margin-left: 18px;
  // margin-right: 28px;
  i {
    font-size: 20px;
    cursor: pointer;
    margin-right: 8px;
  }

  .vul-refresh {
    color: #0289f7;
  }
}
</style>
